﻿@model List<DevWeb.Biztalk.DeploymentSettings.WebUI.Models.IntegrationViewModel>


@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New Integration", "CreateIntegration", "Integration") | 
     @Html.ActionLink("Import IntegrationVersion File", "ImportFile", "Integration")
</p>
@if (Model.Count > 0)
{
    <table>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model[0].Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model[0].Description)
            </th>
            <th>
                @Html.DisplayNameFor(model => model[0].ProductUpgradeCode)
            </th>
       
           @* <th>
                @Html.DisplayNameFor(model => model[0].VersionCount)
            </th>*@
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ProductUpgradeCode)
                </td>
       
               @* <td>
                    @Html.DisplayFor(modelItem => item.VersionCount)
                </td>*@
                <td>
                    @Html.ActionLink("Edit", "Edit", new {id = item.Id}) |
                    @Html.ActionLink("VersionInformation", "Index", "IntegrationVersion", new {id=item.Id}, null) 
           
                </td>
            </tr>
        }

    </table>
}
else
{
    <p> There are no integrations found in the Database</p>
    <p>
        @Html.ActionLink("Create New Integration", "CreateIntegration", "Integration")
    </p>
}